using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Collections;
using System.Collections.Generic;
namespace Kunlun.Models
{
      [Table("Product")]
      public class Product
      {
          
         [Key]  
         [DisplayName("产品ID")] 
         public string pid { get; set; }
         [Required(ErrorMessage = "产品类型不能空")]  
         [DisplayName("产品类型")] 
         public string Classid { get; set; }
         [Required(ErrorMessage = "产品名称不能空")]  
         [DisplayName("产品名称")] 
         public string Name { get; set; }
         [DisplayName("产地")] 
         public string area { get; set; }
         [DisplayName("是否有赠品绑定(默认0,没有;1,绑定赠品)")] 
         public bool Had_p { get; set; }
         [DisplayName("是否有视频绑定(默认0,没有;1,绑定视频)")] 
         public bool Had_v { get; set; }
         [DisplayName("link to templete table")] 
         public int? TempleteID { get; set; }
         [DisplayName("市场价")] 
         public decimal Makeprice { get; set; }
         [DisplayName("咔嚓价")] 
         public decimal Kacaprice { get; set; }
         [DisplayName("其他价格")] 
         public decimal Otherprice { get; set; }
         [DisplayName("产品重量")] 
         public double weight { get; set; }
         [Required(ErrorMessage = "是否上架(0:未上架1:已上架)不能空")]  
         [DisplayName("是否上架(0:未上架1:已上架)")] 
         public bool Isrelease { get; set; }
         [DisplayName("是否热卖")] 
         public bool IsHot { get; set; }
         [DisplayName("是否推荐")] 
         public bool IsPut { get; set; }
         [DisplayName("是否特价")] 
         public bool IsCheap { get; set; }
         [Required(ErrorMessage = "添加时间不能空")]  
         [DisplayName("添加时间")] 
         public DateTime BeginDate { get; set; }
         [DisplayName("产品介绍")] 
         public string Contents { get; set; }
         [DisplayName("产品关键词")] 
         public string Keywords { get; set; }
         [DisplayName("可抵扣积分")] 
         public int Scored { get; set; }
         [DisplayName("访问次数")] 
         public int Clicks { get; set; }
         [DisplayName("产品预览图地址")] 
         public string ViewPic { get; set; }
         [DisplayName("库存数量")] 
         public int Leave { get; set; }
         [DisplayName("商品货号")] 
         public string GoodsNum { get; set; }
         [DisplayName("产品状态(0:回收站1.未审核2.已审核)")] 
         public int P_status { get; set; }
         [DisplayName("seo页面名称")] 
         public string SeoPageName { get; set; }
         [DisplayName("seo标题")] 
         public string SeoTitle { get; set; }
         [DisplayName("seo关键词")] 
         public string Seokeyword { get; set; }
         [DisplayName("seo描述")] 
         public string SeoDescription { get; set; }
         [DisplayName("最后修改时间")] 
         public DateTime LastUpdateTime { get; set; }         
        [ForeignKey("ProductID")]
         public virtual ICollection<Product_pic> Product_pic { get; set; } //产品图片
         [ForeignKey("Pid")]
          public virtual ICollection<Product_attributes> Product_attributes { get; set; }//产品规格          

         [ForeignKey("Pid")]
          public virtual ICollection<Product_propertys> Product_propertys { get; set; } //产品属性

         } 
} 
